//#pragma once
namespace TicTacToe
{
	public ref class WinnerToTextConverter sealed : public Windows::UI::Xaml::Data::IValueConverter
	{
	public:
		WinnerToTextConverter(void);
		//~WinnerToTextConverter(void);
		virtual Platform::Object^ Convert(Platform::Object^ value,
			Windows::UI::Xaml::Interop::TypeName targetType,
			Platform::Object^ parameter,
			Platform::String^ language)
			{
				int player = (int)value;

				if(player > 0)
				{
					return "Player " + player + " wins!";
				}

				return "";
			}

		virtual Platform::Object^ ConvertBack(Platform::Object^ value,
			Windows::UI::Xaml::Interop::TypeName targetType,
			Platform::Object^ parameter,
			Platform::String^ language)
			{
				throw ref new Platform::NotImplementedException();
			}
	};
}

